<?php include 'php/classes/handle_item_deletion.php';


echo Utils::breadCrumbs(array(
							array('label' => 'My beverage list', 'link' => 'preferences'), 
							array('label'=> 'My beverage #'.@$_GET['i'], 'link'=>'editselection&i='.@$_GET['i']),
							array('label' => 'Confirm delete beverage') 
						));

if ( isset($_POST['submit-delete']) ): 

$beverage_id = isset($_GET['i']) && !empty($_GET['i']) ? intval($_GET['i']) : 0;

unset($_SESSION['selection'][ $beverage_id ]);

Utils::redirect('preferences');

?>
	
<?php else : ?>

<form method="post" action="index.php?p=deleteselection&i=<?php echo @$_GET['i']; ?>">
	
	<h3>Do you really want to remove this selection from your account?</h3>
	<p>Once deleted, this selection will no more be available in your selection list.</p>
	<br />

	<p class="button_container">
		<img src="img/icons/ok.png" class="button_icon"/><input class="button green" type="submit" name="submit-delete" value="YES I do" />
		<img src="img/icons/cancel.png" class="button_icon"/><input class="button red" type="submit" name="submit-back" value="No, I want to keep my beverage" />
	</p>

</form>

<?php endif; ?>
